package extensions;

import play.templates.JavaExtensions;

import java.text.NumberFormat;
import java.util.Locale;

public class CurrencyExtensions extends JavaExtensions {
    public static String formatPrice(Number number, String currency) {
        String[] curS = currency.split("-");
        return NumberFormat.getCurrencyInstance(new Locale(curS[0], curS[1])).format(number);
    }
}
